<cc:page type="normal" style="standard" showSidebar="false" showHeader="true" />
<cc>
    //*********************************------获取合同数据------****************************************
    CCService cs = new CCService(userInfo);
    String id = request.getParameter("id")==null?"":request.getParameter("id")+"";//合同ID
    List<CCObject> cxht= cs.cquery("contract","is_deleted='0' and id='"+id+"'");//查询合同
    if(cxht.size()>0){
        out.print("111");
        String jllx= cxht.get(0).get("recordtypeccname")==null?"":cxht.get(0).get("recordtypeccname")+"";//合同类型
        String fkfs= cxht.get(0).get("fkfs")==null?"":cxht.get(0).get("fkfs")+"";//付款方式
        String xmmc0= cxht.get(0).get("xmmc0")==null?"":cxht.get(0).get("xmmc0")+"";//项目名称
        List<CCObject> htmbzjb1= cs.cquery("htmbzjb1","is_deleted='0' and xmmc='"+xmmc0+"' and fkfs='"+fkfs+"' and htlx='"+jllx+"'");//查询中间表
        if(htmbzjb1.size()>0){
            String htmb= htmbzjb1.get(0).get("htmb")==null?"":htmbzjb1.get(0).get("htmb")+"";//合同模板
            List<CCObject> htmbzjb= cs.cquery("htmbzjb","is_deleted='0' and mbmc='"+htmb+"'");
            if(htmbzjb.size()>0){
                for(int i=0;i<htmbzjb.size();i++){
                </cc>
                    //WebOfficeObj.WebSetBookmarks('<cc:outprint>htmbzjb.get(i).get("htzd").toString()</cc:outprint>','<cc:outprint>cxht.get(0).get(htmbzjb.get(i).get("ydzd").toString())</cc:outprint>');  
                <cc>
                }
            }
        }
    }
</cc>
